Cs 267 Lecture 3
نویسنده
چکیده
Single-source shortest paths. In the single-source shortest paths problem (SSSP), we are given a graph G = (V,E) and a source node s ∈ V , and we must compute d(s, v) for all v ∈ V . If the graph is unweighted, we can solve this in O(m + n) time by breadth-first search (BFS). If the graph has nonnegative integer weights, we can use Dijkstra’s algorithm with Fibonacci heaps, yielding a runtime of O(m+ n log n). When G is undirected, Thorup (1999) [1] improved this runtime to O(m+n), in the “word-RAM” model of computation, in which the weights fit in words in memory, and operations on word integers take constant time.